<!DOCTYPE html>
<html lang="en">
  <head>
      <meta charset="UTF-8">
      <title>综合练习</title>
      <style>
          div{
              width: 300px;
              background-color:rgba(0,0,0,0.3) ;
              padding: 10px;
              position: relative;
          }
          input{
              width: 260px;
              border:0;
              padding: 10px 20px;
              color:cadetblue;
          }
          img{
              position: absolute;
              margin:5px 0 0px -50px ;
          }
          p{
              color: red;
              font-size: 12px;
              margin: 0;
          }
      </style>
  </head>
  <body>
    <div>
        <input type="text" value="请输入用户名">
        <img src="yhm.png" alt=>
        <p>用户名不能为空</p>
    </div>
  </body>
</html>